package com.producer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.health.HealthIndicator;

import com.PiwikDao;
import com.PiwikPredictionioSysCfgDao;
import com.google.common.util.concurrent.AbstractExecutionThreadService;

public abstract class DataScanner extends AbstractExecutionThreadService implements HealthIndicator {

	@Autowired
	protected PiwikPredictionioSysCfgDao piwikPredictionioSysCfgDao;
//	@Autowired
//	PredictionIoService predictionIoService;
	@Autowired
	protected PiwikDao piwikdao;
	
	@Autowired
	protected KafkaProducerService kafkaProducerService;
	

	public DataScanner() {
		super();
	}


	@Override
	protected void run() throws Exception {
		while ( isRunning() ) {
			exec();
		}	
		
	}


	abstract void exec() throws Exception;
	
	

}